//////////////////////////////////////////////////////////////////////////////////
//	 Copyright 2011 by Yosef Grabivker, ryuho@homenetworksoft.com
//
//   Licensed under the Apache License, Version 2.0 (the "License");
//   you may not use this file except in compliance with the License.
//   You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
//   Unless required by applicable law or agreed to in writing, software
//   distributed under the License is distributed on an "AS IS" BASIS,
//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//   See the License for the specific language governing permissions and
//   limitations under the License.
//////////////////////////////////////////////////////////////////////////////////

#ifndef _UTILS_H_YG_H__
#define _UTILS_H_YG_H__

#include "wx/wx.h"
#include "def.h"

#define MAC_ADDR_SIZE 17

wxString						ExtractMACFromString(const wxString& data, char cMACDEL=':');
wxString						ExtractIPFromString(const wxString& data);

bool							IsMACEqual(const wxString& strMAC, const wxString& strMAC1);
TEXTLIST						StrToList(const wxString& str);
std::string						MailEncode(const std::string& strSrc);

wxString						URLEncode(const wxString &value);
wxString						HexFromInt(const int &value);

//Get user data value from selected  combobox or others item containers item
void*							GetSelectedItemData( class wxItemContainer& cont );
int								GetSelectedItemDataInt( class wxItemContainer& cont );

struct CTimeDiff
{
								CTimeDiff(const char* szStage);
								~CTimeDiff();

private:
	unsigned int				m_iStamp;
	const char*					m_szStage;
};


#endif //_UTILS_H_YG_H__